package com.yao.club.entity.dto;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.Instant;

@Getter
@Setter
@Entity
@Table(name = "goods_main")
public class GoodsMain {
    @Id
    @Column(name = "id", nullable = false)
    private Long id;

    @Column(name = "code", nullable = false, length = 64)
    private String code;

    @Column(name = "title", nullable = false)
    private String title;

    @Column(name = "brand_id")
    private Long brandId;

    @Column(name = "brand_name")
    private String brandName;

    @Column(name = "category_name", length = 64)
    private String categoryName;

    @Column(name = "model_code", length = 64)
    private String modelCode;

    @Column(name = "model_name")
    private String modelName;

    @Column(name = "product_type", length = 64)
    private String productType;

    @Column(name = "market_price", precision = 18, scale = 2)
    private BigDecimal marketPrice;

    @Column(name = "purchase_price", precision = 18, scale = 2)
    private BigDecimal purchasePrice;

    @Column(name = "main_img_url")
    private String mainImgUrl;

    @Lob
    @Column(name = "detail_url")
    private String detailUrl;

    @Lob
    @Column(name = "poster_url")
    private String posterUrl;

    @Lob
    @Column(name = "details")
    private String details;

    @Lob
    @Column(name = "video_url")
    private String videoUrl;

    @Column(name = "tline_code", length = 64)
    private String tlineCode;

    @Column(name = "tline_name")
    private String tlineName;

    @Column(name = "sold_num")
    private Integer soldNum;

    @Column(name = "post")
    private Boolean post;

    @Column(name = "displacement", length = 64)
    private String displacement;

    @Column(name = "license_code", length = 64)
    private String licenseCode;

    @Column(name = "license_name", length = 64)
    private String licenseName;

    @Column(name = "params")
    private String params;

    @Column(name = "wagon_number_code", length = 64)
    private String wagonNumberCode;

    @Column(name = "wagon_number_name", length = 64)
    private String wagonNumberName;

    @Column(name = "video_img_url")
    private String videoImgUrl;

    @Lob
    @Column(name = "tag_name")
    private String tagName;

    @Column(name = "create_time")
    private Instant createTime;

    @Column(name = "update_time")
    private Instant updateTime;

    @Column(name = "category_id")
    private Integer categoryId;

    @Column(name = "state")
    private String state;

    @Column(name = "stocks")
    private Integer stocks;

}